import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
/**
* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
*                                if not set alwaysShow, only more than one route under the children
*                                it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect           if `redirect:noredirect` will no redirect in the breadcrumb
* name:'router-name'             the name is used by <keep-alive> (must set!!!)
* meta : {
    title: 'title'               the name show in subMenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar
    breadcrumb: false            if false, the item will hidden in breadcrumb(default is true)
  }
**/
const router = new Router({
    base: '/ilink-bs/',
    mode: 'hash', // hash  使用简单、无需后台支持 在url中以hash形式存在，不会传到后台； history 地址明确，便于理解和后台处理  需要后台配合
    routes: [
        {
            path: '/login', // 登录
            component: () => import('../components/Login/Main'),
            name: 'login',
            meta: {
                title: '智慧消防平台-大屏'
            }
        },
        {
            path: '*',
            redirect: '/login'
        },
        {
            path: '/loading', // loading
            component: () => import('../components/Loading/Main'),
            name: 'loading',
            meta: {
                title: '智慧消防平台-loading'
            }
        },
        {
            path: '/weather', // 天气
            component: () => import('../components/Weather/Main'),
            name: 'weather',
            meta: {
                title: '智慧消防平台-天气'
            }
        },
        {
            path: '/home', // 首页
            component: () => import('../components/Home/Main'),
            name: 'home',
            meta: {
                title: '智慧消防平台-首页'
            }
        },
        {
            path: '/HomeLeft', // 首页-左边（包括多、单、详情）
            component: () => import('../components/Home/HomeLeft'),
            name: 'homeLeft',
            meta: {
                title: '智慧消防平台-左边'
            }
        },
        {
            path: '/HomeRight', // 首页-右边（包括多、单、详情）
            component: () => import('../components/Home/HomeRight'),
            name: 'homeRight',
            meta: {
                title: '智慧消防平台-右边'
            }
        },
        {
            path: '/HomeBottom', // 首页-底部
            component: () => import('../components/Home/HomeBottom'),
            name: 'homeBottom',
            meta: {
                title: '智慧消防平台-底部'
            }
        },
        {
            path: '/Popup',
            component: () => import('../components/Popup/Main'),
            name: 'popup',
            meta: {
                title: '智慧消防平台-详情小弹窗'
            }
        },
        {
            path: '/Detail', // 详情大页面
            component: () => import('../components/Detail/Main'),
            name: 'detail',
            meta: {
                title: '智慧消防平台-详情大页面'
            }
        },
        /* {
      path: '/PlatformManage', // 详情大页面-平台管理
      component: () => import('../components/Detail/Model/PlatformManage/Main'),
      name: 'PlatformManage',
      meta: {
        title: '智慧消防平台-详情大页面-平台管理'
      }
    }, */
        {
            path: '/map', // 首页-地图
            component: () => import('../components/Map/Main'),
            name: 'map',
            meta: {
                title: '智慧消防平台-地图'
            }
        },
        {
            path: '/AudioDiscern', // 语义识别结果播报弹框（地图正下方语音横幅/语音指令）
            component: () => import('../components/Audio/AudioDiscern'),
            name: 'AudioDiscern',
            meta: {
                title: '智慧消防平台-语义识别结果播报弹框'
            }
        },
        {
            path: '/AudioDispose', // 语义识别结果处理弹框
            component: () => import('../components/Audio/AudioDispose'),
            name: 'AudioDispose',
            meta: {
                title: '智慧消防平台-语义识别结果处理弹框'
            }
        }
    ]
})

export default router
